/*
 * cube.cpp
 *
 *  Created on: 19.12.2008
 *      Author: felix
 */
#ifdef WIN32
#include <windows.h>
#endif

#ifdef __APPLE__
#include <OpenGL/gl.h>  // The GL Header File
#include <GLUT/glut.h>  // The GL Utility Toolkit (Glut) Header
#else
#include <GL/gl.h>      // The GL Header File
#include <GL/glut.h>    // The GL Utility Toolkit (Glut) Header
#include <GL/glext.h>
#endif

#include "cube.h"


Cube::Cube(int xCoord=0, int yCoord=0, int zCoord=0) {
	x = xCoord;
	y = yCoord;
	z = zCoord;
}

void Cube::draw(GLUquadric *quadric) {
	glPushMatrix();
	glTranslatef(0.5f+x, 0.5f+y, 0.5f+z); // right, bottom corner as reference point
	glutSolidCube(1);
	glRotatef(90,1,0,0);
	glTranslatef(0.0f, 0.0f, 0.5f);
	glutSolidSphere(0.5, 3, 3);
//	gluCylinder(quadric, 0.5, 0.5, 1, 3, 3);
	glPopMatrix();
}
